﻿<BSForm Model="@formsModelValTT" ValidateOnInit="true">
    <DataAnnotationsValidator />
    <BSRow>
        <BSFormGroup Class="col-md-12">
            <BSLabel For="exampleEmail6">Input without validation</BSLabel>
            <BSBasicInput InputType="InputType.Text" Id="exampleEmail6" />
        </BSFormGroup>
        <BSFormGroup Class="col-md-12">
            <BSLabel For="exampleEmail7">Valid input</BSLabel>
            <BSInput InputType="InputType.Text" Id="exampleEmail7" @bind-Value="@formsModelValTT.Valid"/>
            <BSFormFeedback For="@(() => formsModelValTT.Valid)" IsTooltip="true"  ValidMessage="Sweet! that name is available"/>
        </BSFormGroup>
        <BSFormGroup Class="col-md-12">
            <BSLabel For="exampleEmail8">Invalid input</BSLabel>
            <BSInput InputType="InputType.Text" Id="exampleEmail8" @bind-Value="@formsModelValTT.InValid"/>
            <BSFormFeedback For="@(() => formsModelValTT.InValid)" IsTooltip="true" ValidMessage="Sweet! you fixed the issue"  />
        </BSFormGroup>
        <BSFormGroup Class="col-md-12">
            <BSLabel For="exampleDate">Date input</BSLabel>
            <BSInput InputType="InputType.Date" Id="exampleDate" @bind-Value="@formsModelValTT.Date" />
            <BSFormFeedback For="@(() => formsModelValTT.Date)" IsTooltip="true" ValidMessage="Sweet! you've chosen the right date" />
        </BSFormGroup>
    </BSRow>
</BSForm>
@code
{
    private FormsModel formsModelValTT = new FormsModel();
   
    public class FormsModel
    {
        public string Valid { get; set; }
        [Required(AllowEmptyStrings = false, ErrorMessage = "Oh noes! that name is already taken")]
        public string InValid { get; set; }
        public string Blank { get; set; }
        public string Email { get; set; } = "email@example.com";
        public DateTime Date { get; set; }
    }
}